import { Entity, Column, PrimaryGeneratedColumn,ManyToMany, ManyToOne, JoinColumn, OneToOne , BaseEntity, OneToMany } from 'typeorm';
import { DeleteTagEnum, RejectReasonEnum, TypeEnum } from './answer.enum'

@Entity('answer')
export class Answer extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ name: 'video_id' })
  video_id: number;

  @Column({ name: 'id_card' })
  id_card: number;

  @Column({ name: 'answer' })
  answer: string;

  @Column({ name: 'wx_user' })
  wx_user: string;

  @Column({ name: 'create_time' })
  create_time: Date;

  @Column({ name: 'update_time' })
  update_time: Date;

  @Column({ name: 'reject_auto_time' })
  reject_auto_time: Date;

  @Column({ name: 'check_time' })
  check_time: Date;

  @Column({ name: 'check' })
  check: number;

  @Column({ name: 'ic_group' })
  ic_group: number;

  @Column({ name: 'img' })
  img: string;

  @Column({ name: 'img_id' })
  img_id: string;

  @Column({ name: 'delete_tag' })
  delete_tag: DeleteTagEnum;

  //对应回答模板
  @Column({ name: 'answer_template_id' })
  answer_template_id: number;

  //答案类型，0：直接回答 1：模板
  @Column({ name: 'type' })
  type: TypeEnum;

  @Column({ name: 'reject_reason' })
  reject_reason: string;

  @Column({ name: 'group_uid' })
  group_uid: number;

  @Column({ name: 'is_replace' })
  is_replace: number;
}
